import Vue from 'vue';
import Vuex from 'vuex';
import mytab from './modules/mytab';
import layout from './modules/layout';
import common from './modules/common';
import CreatePersistedState from 'vuex-persistedstate';

Vue.use(Vuex);

const store = new Vuex.Store({
    strict: true,
    plugins: [
        CreatePersistedState({
            reducer(state) {
                return {
                    mytab: state.mytab
                };
            }
        })
    ],
    modules: {
        mytab,
        layout,
        common
    }
});

export default store;
